home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG Library 8 / PC-SIG Library CD-ROM (8th Edition) (1990-04).iso / 2001_100 / disk2093 / ch7_1.doc < prev    next >
Encoding:
Text File  |  1990-02-11  |  1.8 KB  |  75 lines

  1. ..pgno01
  2. ..foot63A7-##
  3. ..head02L──────────────────────────────────────────────────────────────────────
  4. ..head04L──────────────────────────────────────────────────────────────────────
  5. ..head03ABeep
  6. ■ Description
  7.  
  8.   Beep the speaker.
  9.  
  10.  
  11. ■ Summary
  12.  
  13.   Procedure Beep( Freq, Dur : Word );
  14.  
  15.   Freq             is the tone, in units, of the speaker.
  16.  
  17.   Dur              is the duration of time in units to beep the
  18.                    speaker.
  19.  
  20.  
  21. ■ Example
  22.  
  23.   Program Example;
  24.   Uses FPDos;
  25.   Var
  26.      i : Word;
  27.   Begin
  28.      For i := 1 To 30000 Do
  29.         Beep( i, i );
  30.   End.
  31. ..page
  32. ..head03ADosExec
  33. ■ Description
  34.  
  35.   Execute a child process, without having to worry about setting the
  36.   maximum heap size.
  37.  
  38.  
  39. ■ Summary
  40.  
  41.   Function DosExec( CmdLine : String ) : Integer;
  42.  
  43.   CmdLine          is a string expressing representing the command
  44.                    line or child process to be executed.
  45.  
  46.  
  47. ■ Remarks
  48.  
  49.   This function will return one of the following termination codes:
  50.  
  51.        0 - Normal termination
  52.        1 - Invalid function number
  53.        2 - File not found
  54.        5 - Access denied
  55.        8 - insufficient memory
  56.       10 - invalid envoronment
  57.       11 - invalid format
  58.      999 - Length of command line string is to long
  59.  
  60.  
  61. ■ Example
  62.  
  63.   Program Example;
  64.   Uses FPDos,Crt;
  65.   Begin
  66.      writeln( DosExec( '\command.com /c dir *.*' ) : 1 );
  67.      writeln( DosExec( 'turbo.exe' ) : 1 );
  68.   End.
  69.  
  70.   The program will do a directory listing on the current directory.
  71.   After the directory listing is complete it will start up the turbo
  72.   pascal.  If the test program is unable to execute any of the
  73.   commands or programs then the termination code that is displayed
  74.   will not be 0.
  75. ..page